write custom validation attribute